import { createRouter, createWebHistory } from 'vue-router'
import Login from '../views/Login.vue'
import UserManagement from '../views/UserManagement.vue'
import DepartmentManagement from '../views/DepartmentManagement.vue'
import PositionManagement from '../views/PositionManagement.vue'

const routes = [
  {
    path: '/',
    redirect: '/users'
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/users',
    name: 'UserManagement',
    component: UserManagement
  },
  {
    path: '/departments',
    name: 'DepartmentManagement',
    component: DepartmentManagement
  },
  {
    path: '/positions',
    name: 'PositionManagement',
    component: PositionManagement
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router